﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Model_SSResourceManager
{
    public interface IDataBase
    {
        #region Status ... Errors
        bool IsSqlError { get; }        
        string SqlErrorMessage { get; }

        #endregion Status ... Errors

        #region events
        event EventHandler<DbErrEventArgs> DbErrEvent;
        #endregion events

        #region Resource

        bool AddResource(Resource resource);

        bool DeleteResource(Guid id);

        bool UpdateResource(Resource resource);

        Resource GetResource(Guid id);

        List<Resource> GetAllResource(bool ActiveOnly = false);

        #endregion Resource

        #region User

        bool AddUser(User user);

        bool UpdateUser(User user);

        bool DeleteUser(Guid id);

        User GetUser(Guid id);

        List<User> GetAllUser(bool ActiveOnly = false);

        #endregion User        

        #region Queue

        bool AddQueue(Queue queue);

        bool UpdateQueue(Queue queue);

        bool DeleteQueue(Guid id);

        Queue GetQueue(Guid id);

        List<Queue> GetAllQueue(bool showActive = false);

        #endregion Queue

        #region Message

        bool AddMessage(Message _message);

        bool UpdateMessage(Message _message);

        bool DeleteMessage(Guid id);

        Message GetMessage(Guid id);

        List<Message> GetAllMessage(bool showActive = false);
        List<Message> GetActiveMessageByUser(Guid _userId);

        #endregion Message

    }
}
